home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / game / role / ldmud-3.2-bin.lha / mud / doc / efun / process_string < prev    next >
Text File  |  2001-04-06  |  1KB  |  41 lines

  1. OPTIONAL
  2. SYNOPSIS
  3.         string process_string(string str)
  4.  
  5. DESCRIPTION
  6.         Searches string str for occurences of a "value by function
  7.         call", which is @@ followed by an implicit function call. See
  8.         "value_by_function_call" in the principles section.
  9.         
  10.         The value should contain a string like this:
  11.         @@function[:filename][|arg|arg]@@
  12.         
  13.         function must return a string or else the string which should be
  14.         processed will be returned unchanged.
  15.         
  16.         Note that process_string() does not recurse over returned
  17.         replacement values. If a function returns another function
  18.         description, that description will not be replaced.
  19.  
  20.         Note that both filename and args are optional.
  21.  
  22. EXAMPLE
  23.         string foo(string str) {
  24.            return "ab"+str+"ef";
  25.         }
  26.         void func() {
  27.            write(process_string("@@foo|cd@@")+"\n");
  28.         }
  29.         
  30.         The function func() will print out the string "abcdef".
  31.  
  32. BUGS
  33.         Using process_string() can lead to severe security problems.
  34.  
  35. HISTORY
  36.         Because of the security problems, process_string() is an
  37.         optional efun since 3.2.1@34
  38.  
  39. SEE ALSO
  40.         notify_fail(E), closures(LPC), get_bb_uid(M)
  41.